package com.hoshiibuy.customerOperation.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.extension.activerecord.Model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 购物车购物信息记录表
 * </p>
 *
 * @author Mr.Wu
 * @since 2019-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Cart对象", description = "购物车购物信息记录表")
public class Cart extends Model<Cart> {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "自增ID号")
	private Long recId;

	@ApiModelProperty(value = "用户id，取自session，")
	private Long userId;

	@ApiModelProperty(value = "商品的id，取自表goods的goods_id")
	private Long goodsId;

	@ApiModelProperty(value = "商品的货号，取自表goods的goods_sn")
	private String goodsSn;

	@ApiModelProperty(value = "商品的名称，取自表goods的goods_name")
	private String goodsName;

	@ApiModelProperty(value = "商品的市场价，取自表goods的market_price")
	private BigDecimal marketPrice;

	@ApiModelProperty(value = "商品的本店价，取自表goods的shop_price")
	private BigDecimal goodsPrice;

	@ApiModelProperty(value = "商品的购买数量，在购物车时，实际库存不减少")
	private Long goodsQuantity;

	@ApiModelProperty(value = "商品的属性，中括号里是该属性特有的价格")
	private String goodsAttr;

	@ApiModelProperty(value = "商品的扩展属性，取自goods的extension_code")
	private String extensionCode;

	@ApiModelProperty(value = "该商品的父商品id，没有该值为0，有的话那该商品就是该id的配件")
	private Long parentId;

	@ApiModelProperty(value = "购物车商品类型")
	private Boolean recType;

	@ApiModelProperty(value = "是否是赠品，0，否；其他，是参加优惠活动的id，取值于ecs_favourable_activity 的act_id")
	private Integer isGift;

	@ApiModelProperty(value = "添加时间")
	private LocalDateTime addedtime;

	@ApiModelProperty(value = "状态   0-失效 1-有效")
	private Integer status;

	@Override
	protected Serializable pkVal() {
		return this.recId;
	}

}
